package com.ehsy.service;

import com.dtflys.forest.annotation.Address;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Var;
import com.ehsy.common.ResponseVo;
import com.ehsy.model.MyAddressSource;
import org.springframework.stereotype.Service;

/**
 * @author YanZhen_Li
 * @version 1.0
 * @title PathService
 * @description
 * @create 2024/6/17 14:55
 */
@Service
@Address(host = "127.0.0.1", port = "8080")
public interface PathService2 {
    // 绑定接口上的默认根地址
    // 最终URL: http://127.0.0.1:8080/data2
    @Post("/test/request/json/formBody")
    ResponseVo<Object> sendData1();

    // 使用方法上的根地址
    // 最终URL: http://192.168.0.1:7000/data3
    @Post("/test/request/json/formBody")
    @Address(host = "192.168.54.104", port = "8080")
    ResponseVo<Object>  sendData2();

    @Post("/test/request/json/formBody")
    @Address(source = MyAddressSource.class)
    ResponseVo<Object>  sendData3();
}
